package com.ita.osc.bean;

import com.fasterxml.jackson.annotation.JsonTypeInfo.Id;

public class Dish {
	
	private String did;
	private String dname;
	private double price;
	private String img;
	
	public Dish(String did, String dname, double price, String img) {
		super();
		this.did = did;
		this.dname = dname;
		this.price = price;
		this.img = img;
	}

	public Dish(String dname, double price, String img) {
		super();
		this.dname = dname;
		this.price = price;
		this.img = img;
	}

	public String getDid() {
		return did;
	}

	public void setDid(String did) {
		this.did = did;
	}

	public String getDname() {
		return dname;
	}

	public void setDname(String dname) {
		this.dname = dname;
	}

	public double getPrice() {
		return price;
	}

	public void setPrice(double price) {
		this.price = price;
	}

	public String getImg() {
		return img;
	}

	public void setImg(String img) {
		this.img = img;
	}
	
	@Override
	public int hashCode() {
		// TODO Auto-generated method stub
		return did.hashCode();
	}
	
	@Override
	public boolean equals(Object obj) {
		// TODO Auto-generated method stub
		if (obj instanceof Dish) {
			Dish dish_ = (Dish) obj;
            return (did.equals(dish_.getDid()));
        }
		return super.equals(obj);
	}
}
